import nprogress from "nprogress";
import router from "..";
import "nprogress/nprogress.css";
import { ref } from "vue";
export const loading = ref(false);
router.beforeEach((to, from, next) => {
  loading.value = true;
  nprogress.start();
  setTimeout(() => {
    next();
  }, 2000);
});
router.afterEach(() => {
  loading.value = false;
  nprogress.done();
});
